package com.dhj.handler;

import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author DaHuaJia
 * @Description 基于表单的认证失败处理器
 * @Date 2022-04-05 09:20:14
 */
@Component
public class DhjFailureHandler implements AuthenticationFailureHandler {

    @Override
    public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) {
        System.out.println("====== 认证失败 ======");
    }

}
